<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTestingResultTypesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('testing_result_type', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title',100)->default('')->comment('结果标题');
            $table->decimal('max_score',4,2)->default(0)->comment('最大分数');
            $table->decimal('min_score',4,2)->default(0)->comment('最小分数');
            $table->text('attr_ids')->default('')->comment('属性列表');
            $table->string('factor_str',255)->default('')->comment('额外计算因子');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('testing_result_type');
    }
}
